﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI.HtmlControls;

namespace lcmyjobs.Web
{
    public class BasePage:System.Web.UI.Page
    {
        protected override void OnLoad(EventArgs e)
        {
            if (!Page.IsPostBack)
            {

                setMeta(Application["keywords"].ToString(), Application["description"].ToString());
                base.OnLoad(e);
            }
        }
        public void setMeta(string key, string des)
        {
            HtmlMeta
                keywords = new HtmlMeta(), // keywords
                description = new HtmlMeta(); // description
            keywords.Name = "keywords";
            keywords.Content = key;

            description.Name = "description";
            description.Content = des;

            Page.Header.Controls.Add(keywords);
            Page.Header.Controls.Add(description);
        }
        //protected override void OnInit(EventArgs e)
        //{
        //    base.OnInit(e);
        //    ViewStateUserKey = Session.SessionID;
        //}
    }
}